projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a0d0ed
)
(print_string): Check validity of a character.
author
Kenichi Handa
<handa@m17n.org>
Wed, 4 Nov 1998 10:53:14 +0000
(10:53 +0000)
committer
Kenichi Handa
<handa@m17n.org>
Wed, 4 Nov 1998 10:53:14 +0000
(10:53 +0000)
(print): Likewise.
src/print.c
patch
|
blob
|
history
diff --git
a/src/print.c
b/src/print.c
index ec340e2c91ded077c982aa9331a2a495999188b0..3723c79b6ddd85bdd9c2e3b6b8248e198c1d70a4 100644
(file)
--- a/
src/print.c
+++ b/
src/print.c
@@
-635,7
+635,11
@@
print_string (string, printcharfun)
int len;
int ch = STRING_CHAR_AND_CHAR_LENGTH (XSTRING (string)->data + i,
size_byte - i, len);
-
+ if (!CHAR_VALID_P (ch, 0))
+ {
+ ch = XSTRING (string)->data[i];
+ len = 1;
+ }
PRINTCHAR (ch);
i += len;
}
@@
-1266,7
+1270,10
@@
print (obj, printcharfun, escapeflag)
{
c = STRING_CHAR_AND_CHAR_LENGTH (str + i_byte,
size_byte - i_byte, len);
- i_byte += len;
+ if (CHAR_VALID_P (c, 0))
+ i_byte += len;
+ else
+ c = str[i_byte++];
}
else
c = str[i_byte++];